package com.yang.storage.controller;

import com.yang.springcloud.pojo.ShoppingCartGoods;
import com.yang.storage.service.StorageServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class StorageController {
    @Autowired
    StorageServiceImp storageServiceImp;

    @PostMapping("/updatestorage")
    public Map<String, Object> addStudent(List<ShoppingCartGoods> goodList) {
        return storageServiceImp.updateStock(goodList);
    }
}
